# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo5.10
# Description:
# Author:       98745
# Date:         2019/2/26
#-------------------------------------------------------------------------------

s=input('请输入一个大字符串：')
while True:
    substring=input('请输入一个子字符串：')
    if substring=='end':
        break
    startstr=input('请输入开始索引：')
    endstr=input('请输入结束索引：')
    start=0
    end=len(s)
    if startstr != '':
        start=int(startstr)
    if endstr != '':
        end=int(endstr)
    print("'{}'在{}出现的位置是{}".format(substring,s,s.find(substring,start,end)))